﻿SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE TDOCUMENTATION (
    PUBLISHING_ORGANIZATION  VARCHAR(100),
    SIGNATURE_OWNER_ID       INTEGER,
    ID                       INTEGER       NOT NULL
);

ALTER TABLE TDOCUMENTATION ADD CONSTRAINT PK_TDOCUMENTATION PRIMARY KEY (ID);

-----------------------------------------------------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE TACCOUNT_DOCUMENTS (
    ACCOUNT_CRITERION   VARCHAR(100),
    ACCOUNTING_SUBJECT  VARCHAR(100),
    ID                  INTEGER NOT NULL
);

ALTER TABLE TACCOUNT_DOCUMENTS ADD CONSTRAINT PK_TACCOUNT_DOCUMENTS PRIMARY KEY (ID);

-------------------------------------------------------------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE TEDUCATIONAL_DOCUMENTS (
    STUDENT_ID    INTEGER,
    ID            INTEGER NOT NULL
);

ALTER TABLE TEDUCATIONAL_DOCUMENTS ADD CONSTRAINT PK_TEDUCATIONAL_DOCUMENTS PRIMARY KEY (ID);

---------------------------------------------------------------------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE TLEGAL_DOCUMENTS (
    DATA             VARCHAR(4000),
    EFFECT_DURATION  VARCHAR(100),
    ID               INTEGER NOT NULL
);

ALTER TABLE TLEGAL_DOCUMENTS ADD CONSTRAINT PK_TLEGAL_DOCUMENTS PRIMARY KEY (ID);

---------------------------------------------------------------------------------